#include <stdio.h>
#include <unistd.h>
#include <string.h>

#include "armsdkerr.h"
#include "armsdkcmdhist.h"
#include "armsdkcmdregister.h"

#include "mpu6050.h"
#include "oled.h"
#include "tftlcd.h"
#include "uart.h"
#include "uartglob.h"

INT4 armSdkInit()
{
    return SUCCESS;
}

INT4 armSdkExit()
{
    if (oledState == TRUE)
    {
        armDrvOledDisable();
    }

    if (gmpuState == TRUE)
    {
        armDrvMpu6050Disable();
    }

    if (tftlcdState == TRUE)
    {
        armDrvTftlcdDisable();
    }

    if (uartgetState() == TRUE)
    {
        PRINTF("disable uart dev ...\n");
        uartDisable();
    }

    destroy_cmdList(gu1CmdList);
    destroy_cmdList(guartCmdList);
    destroy_cmdHist();
    return SUCCESS;
}


